package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.EquipmentTypeDao;
import com.home.qh.model.EquipmentType;
import com.home.qh.service.EquipmentTypeManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("equipmentTypeManager")
public class EquipmentTypeManagerImpl extends GenericManagerImpl<EquipmentType, Long> implements EquipmentTypeManager {
	EquipmentTypeDao equipmentTypeDao;

    @Autowired
    public EquipmentTypeManagerImpl(EquipmentTypeDao equipmentTypeDao) {
        super(equipmentTypeDao);
        this.equipmentTypeDao = equipmentTypeDao;
    }

	public List<EquipmentType> getEquipmentTypeByCodeAndName(String equipmentTypeCode,
			String equipmentTypeName) {
		return equipmentTypeDao.getEquipmentTypeByCodeAndName(equipmentTypeCode, equipmentTypeName);
	}

	public List<EquipmentType> getEquipmentTypeByEquipmentType(EquipmentType equipmentType, String sort, boolean desc, int startResult, int maxResults) {
		return equipmentTypeDao.getEquipmentTypeByEquipmentType(equipmentType, sort, desc, startResult, maxResults);
	}

}